package com.example.zz.example.network.bean;

import android.app.Activity;
import android.content.Intent;

import com.example.zz.example.shape.ShapeActivity;

/**
 * Describe:
 *
 * @author zhangzhuo18.
 * Date: 2022/12/14
 */
public class MainBean {

    private final Class<? extends Activity> nextActivity;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private final Activity currentActivity;
    String name = "null";


    public MainBean(Activity currentActivity, String name, Class<? extends Activity> shapeActivityClass) {
        this.name = name;
        this.currentActivity = currentActivity;
        this.nextActivity = shapeActivityClass;
    }

    public void goToActivity() {
        Intent intent = new Intent();
        intent.setClass(currentActivity, nextActivity);
        currentActivity.startActivity(intent);
    }

}
